//
//  ViewController.m
//  yuXiangMusic
//
//  Created by brother on 16/2/22.
//  Copyright © 2016年 brother. All rights reserved.
//

#import "ViewController.h"
#import "YEMSlideView.h"

#import "SlideTabBarView.h"
#import "YEMWoDeViewController.h"
#import "YEMIndexSlideView.h"
#import "YEMLeftMenuView.h"

#import "YEMBangDanViewController.h"
#import "YEMDianTaiViewController.h"
#import "YEMGeDanViewController.h"
#import "YEMTuiJianViewController.h"


@interface ViewController ()

@property (strong, nonatomic) YEMIndexSlideView *indexSlideView;

@property (weak, nonatomic) IBOutlet UIView *superView;

@end

@implementation ViewController
- (IBAction)myButtonClick:(UIBarButtonItem *)sender {
    
    UIStoryboard *storyboard = self.storyboard;
    YEMWoDeViewController *woDeView = [storyboard instantiateViewControllerWithIdentifier:@"wode"];
    [self presentViewController:woDeView animated:YES completion:nil];
}
- (IBAction)selectButtonClicl:(id)sender {
    
}

//- (YEMIndexSlideView *)indexSlideView {
//
//    if (_indexSlideView == nil) {
//        CGRect screenBound = [[UIScreen mainScreen] bounds];
//        screenBound.origin.y = 60;
//        
//        _indexSlideView = [[YEMIndexSlideView alloc]initWithFrame:screenBound];
//        [self.view addSubview:_indexSlideView];
//    }
//    return _indexSlideView;
//}

- (void)viewDidLoad {
    [super viewDidLoad];
//    [self indexSlideView];

    NSArray *viewControllers = @[@{@"推荐":[YEMTuiJianViewController new]},@{@"歌单":[YEMGeDanViewController new]},@{@"榜单":[YEMBangDanViewController new]},@{@"电台":[YEMDianTaiViewController new]}];
    
    YEMSlideView *tempView = [[YEMSlideView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height) WithviewControllerCountArray:viewControllers];
    
    [self.view addSubview:tempView];
    
    // Do any additional setup after loading the view, typically from a nib.
}




- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


//  无关方法
//- (void)test {

    //    // 左侧的菜单栏
    //    YEMLeftMenuView *leftMenu = [[NSBundle mainBundle]loadNibNamed:@"YEMLeftMenuView" owner:self options:nil].lastObject;
    //    [self.view insertSubview:leftMenu atIndex:0];
    //    self.leftMenuView = leftMenu;
    //    UIPanGestureRecognizer *pan = [[UIPanGestureRecognizer alloc]initWithTarget:self action:@selector(pan:)];
    //    pan.delegate = self;
    //    [self.view addGestureRecognizer:pan];
//}

@end
